﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true" CodeFile="ClassEdit.aspx.cs" Inherits="PeachLite.Admin.ClassEdit" %>

<asp:Content ID="c1" ClientIDMode="Static" runat="server" ContentPlaceHolderID="cphHead" >
    <script type="text/javascript">
        function save() {
            var cid = $("#tbcid").val() ? $("#tbcid").val() : "";
            var cname = $("#tbcname").val() ? $("#tbcname").val() : "";
            var ordinal = getsv("#ordinal");
            var desc = $("#tbdesc").val() ? $("#tbdesc").val() : "";
            if (cname == null || cname == "") {
                alert("栏目名称不能为空！");
                return;
            }
            fx({ cid: cid, name: cname, ordinal: ordinal, desc: desc, c: AJAXCODE.SaveClass, r: Math.random() }, function (data) {
                if (data.Success) {
                    $("#tbcid").val(data.O.CID.toString());
                }
            });
        }

        $(function () {
            var cod = $("#ordinal").attr("cod") ? $("#ordinal").attr("cod") : "";
            setsv("#ordinal", cod);
        });
    </script>
</asp:Content>

<asp:Content ID="c2" ClientIDMode="Static" runat="server" ContentPlaceHolderID="cphMain">
    <div class="box box1">   
        <div class="hd">
            <div class="tit">
                <i class="iconfont">&#xf044;</i>
                <span>栏目编辑</span>
            </div>
        </div>
        <div class="bd cedit">
            <ul class="fm fm1 clearfix">
                <li class="">
                    <dl>
                        <dt>栏目名称：</dt>
                        <dd>
                            <input type="hidden" id="tbcid"  value='<asp:Literal ID="CID" runat="server" ClientIDMode="Static"></asp:Literal>' />
                            <input class="txt" type="text" id="tbcname" placeholder="栏目名称" value='<asp:Literal ID="Name" runat="server" ClientIDMode="Static"></asp:Literal>' />
                        </dd>
                    </dl>
                </li>
                <li class="">
                    <dl>
                        <dt>序号：</dt>
                        <dd>
                            <%--<input class="txt" type="text" id="tbordinal" placeholder="序号" value='<asp:Literal ID="Ordinal" runat="server" ClientIDMode="Static"></asp:Literal>' />--%>
                            <select class="selt" id="ordinal" cod='<asp:Literal ID="Ordinal" runat="server" ClientIDMode="Static"></asp:Literal>'>
                                <option class="1">1</option>
                                <option class="2">2</option>
                                <option class="3">3</option>
                                <option class="4">4</option>
                                <option class="5">5</option>
                                <option class="6">6</option>
                                <option class="7">7</option>
                                <option class="8">8</option>
                                <option class="9">9</option>
                                <option class="10">10</option>
                                <option class="1">11</option>
                                <option class="2">12</option>
                                <option class="3">13</option>
                                <option class="4">14</option>
                                <option class="5">15</option>
                                <option class="6">16</option>
                                <option class="7">17</option>
                                <option class="8">18</option>
                                <option class="9">19</option>
                                <option class="10">20</option>
                            </select>
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>栏目描述：</dt>
                        <dd>
                            <textarea class="area" cols="" rows="" id="tbdesc" placeholder="栏目描述"><asp:Literal ID="Description" runat="server" ClientIDMode="Static"></asp:Literal> </textarea>
                        </dd>
                    </dl>
                </li>
                <li>
                    <dl>
                        <dt>&nbsp;</dt>
                        <dd class="op clearfix">
                           <a class="btn btn3" href="classlist.aspx" >返回</a>
                           <a class="btn btn2" onclick="save();">保存</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
</asp:Content>
